const { Sequelize, Model } = require('sequelize');
const config = require('../../../database.json');

module.exports = {
    sequelize: null,
    connect() {
        this.sequelize = new Sequelize(
            config.database,
            config.username,
            config.password,
            {
                host: config.host,
                dialect: config.dialect,
                port: config.port
            });
    },
    close() {
        this.sequelize.close();
    }
};